home *** CD-ROM | disk | FTP | other *** search
/ La Traviata / La Traviata.iso / viewer / giflib12.zip / COMPILE.ME < prev    next >
Text File  |  1991-05-28  |  5KB  |  107 lines

  1. The gif_lib library and utilities has been successfully compiled on the
  2. following platforms (you will need ansi c compiler for that):
  3.  
  4. 1. IBM-PC, using Turbo C version 2.0/Borland C++ 2.0.
  5. 2. Sun 3, with O.S. 3.5 and O.S. 4.0.3, using gcc (gnu c compiler).
  6. 3. Sun 4, with O.S. 4.1.1, using gcc (gnu c compiler).
  7. 4. HP workstations, running unix BSD4.3, using gcc (gnu c compiler).
  8. 5. SGI personal iris (iris4d) running IRIX 4.3, using its cc.
  9. 6. IBM R6000 running aix, using xlc (Ansi C compiler).
  10.  
  11. The first one (IBM-PC) was the main target of this package. The unix version
  12. compiles all the device independent utilities and more (such as gif to rle
  13. conversions, gif2x11 etc.). The IBM-PC compilation and testing is different
  14. from the unix ones, and are described in seperated section below.
  15.  
  16. Compile and test - IBM PC
  17. -------------------------
  18.  
  19. O.k. if you have TC/BC you are in good shape (otherwise you are on your own)
  20. and compilation will be simple:
  21.  
  22. 1. Goto to the makefiles in .\lib and .\util (called makefile.tc in both
  23.    places) and change the variable CC_LIBS to the exact place you have your
  24.    cc libraries. I use to put them in ram disk (disk f:) for fast access.
  25.    Make sure this is short variable or otherwise dos will complain about
  26.    lines too long (the stupid 128 chars per line), in linkage...
  27. 2. Few of the utilities on .\util needs the TC graphic libraries (the gif2xxxx
  28.    utilities). You need to create a library named graphbgi.lib that holds all
  29.    the BGI drivers and CHR fonts. You do so by a sequence similar to:
  30.  
  31.    a. bgiobj herc       (bgiobj.exe is on one of your TC 2.0 diskettes).
  32.    b. bgiobj egavga
  33.    c. bgiobj cga
  34.    d. bgiobj ibm8514
  35.    e. bgiobj pc3270
  36.    f. bgiobj goth
  37.    g. bgiobj litt
  38.    h. bgiobj sans
  39.    i. bgiobj trip
  40.  
  41.      This will convert all this drivers/fonts into .OBJ files, which can be all
  42.    linked to creat the library:
  43.  
  44.    tlib graphbgi.lib +herc.obj +egavga.obj ... +trip.obj, graphbgi.lst
  45.  
  46.      Copy this library to the same directory as specified by CC_LIBS in 1.
  47.  
  48. 3. Decide what directory you want the executables to br copied to and create
  49.    it if it is new. Goto .\util and set the DEST variable in the makefile 
  50.    (makefile.tc) to that directory.
  51. 4. Fire the compilation by executing make-ibm.bat
  52.  
  53.  
  54. To test most of the utilities reconfigure test-ibm.bat as follows:
  55. 1. make sure the new exectuables directory is in your path variable.
  56. 2. The default display program is gif2bgi (in this package). If may want
  57.    to change its setup. See ./doc/gif2bgi.doc for more.
  58. 3. Set the GIF_DIR variable in the batch file to the absolute path of
  59.    ./pic directory (hold some gif examples).
  60.  
  61. Run test-ibm.bat. You will want to print gif2bgi.doc in ./doc so you will
  62. know how to use it (at list how to exit...).
  63.  
  64.  
  65. Compile and test - UNIX
  66. -----------------------
  67.  
  68. Compiling are testing under unix is simpler than the IBMPC:
  69.  
  70. 1. If you are to use the unix unzip utility to unpack this library, you
  71.    need to use the -d flag to enforce creation of subdirectories. The
  72.    following subdirectories are to be created: bin doc lib pic util.
  73.    But I guess you are after this if you are reading this file now...
  74. 2. You need to convert all files (almost - gif2X11.* has X capitalized), from
  75.    MSDOS convension to unix one. This involves converting to lower case, and
  76.    stripping off ^Z from end of file and CR from CR/LF end of line.
  77.    You can do it manually, However the DOS2UNIX script will do %99 of the job.
  78.    It will convert ALL files found in subdirectories of the current working
  79.    directory from upper case to lower case, and strip the CR from the CR/LF
  80.    end of line used by MSDOS and ^Z from end of file. It does not check if
  81.    the file is binary or a text one, and it will DESTROY the gif images in
  82.    ./pic/*.gif, as it will strip off any CR or ^Z in them. You better move
  83.    the ./pic directory to someplace else before invoking DOS2UNIX and move it
  84.    back afterwords. Also you will probably need to issue 'chmod +x dos2unix'
  85.    to make it executable.
  86.    MAKE SURE no other files but from this unpacked library, exists in the
  87.    current and sub directories, and execute dos2unix.
  88. 3. Go to the ./lib and ./util directories (they should be lower case, after
  89.    dos2unix has been executed), and edit the unix makefiles (makefile.unx)
  90.    for the following:
  91.    a. Set CC to your c compiler name (usually cc but can be gcc - see in the
  92.       makefile.unx).
  93.    b. Select the right flags to the c compilers. Flags for SGI cc, and gcc are
  94.       provided.
  95. 4. Fire the compilation using make-unx. This will leave the executables in
  96.    ./bin.
  97.  
  98. Test the package by adding ./bin to your path and firing the 'test-unx' script.
  99. This assumes the display is X11, and the environment variable DISPLAY is set
  100. properly - uses gif2X11 as display utility.
  101.  
  102.  
  103.  
  104.  
  105. Gershon Elber
  106. gershon@cs.utah.edu
  107.